﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YiDa.Domain;

namespace SYMetro.Domain.Modal.Membership
{
    public class Role : AggregateRoot
    {
        public Role()
        {
            Users = new List<User>();
            Children = new List<Role>();
        }

        public string RoleName { get; set; }

        public string LoweredRoleName { get; set; }

        public string Description { get; set; }

        /// <summary>
        /// 标记 区分角色/部分
        /// </summary>
        public RoleTypes Flag { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public string Sequence { get; set; }

        /// <summary>
        /// 只支持直接角色下的人员，不支持嵌套角色的人员
        /// </summary>
        public virtual List<User> Users { get; set; }

        public virtual List<Role> Children { get; set; }

        public virtual Role Parent { get; set; }
    
    }
}
